import {validatenull} from "@/util/validate";
import {nationalDicData} from "@/util/dicdata";
//手机号码验证
const checkPhone = (rule, value, callback)=> {
    if (!(/^1[345789]\d{9}$/.test(value))) {
        callback(new Error('请输入正确的手机号码!'));
    }else{
        callback();
    }
};
//申请人名字
const checkApplyerName = (rule, value, callback)=> {
    if (value.length > 100) {
        callback(new Error('申报人名称不能超过100字符!'));
    }else{
        callback();
    }
};
//申请人性别
const checkApplyerSex = (rule, value, callback)=> {
    if (!validatenull(value) && !['男', '女'].includes(value)) {
        callback(new Error('申报人性别只能输入\"男\"或者\"女\"!'));
    }else{
        callback();
    }
};
//申请人民族
const checkApplyerNation = (rule, value, callback)=> {
    if (value.length > 50) {
        callback(new Error('申报人民族不能超过50字符!'));
    }else{
        callback();
    }
};
//法定代表人
const checkLegal = (rule, value, callback)=> {
    if (value.length > 100) {
        callback(new Error('法定代表人不能超过100字符!'));
    }else{
        callback();
    }
};
//联系人姓名
const checkContactName = (rule, value, callback)=> {
    if (value.length > 100) {
        callback(new Error('联系人姓名不能超过100字符!'));
    }else{
        callback();
    }
};
//申请人证件号码
const checkApplyerPageCode = (rule, value, callback)=> {
    if (value.length > 500) {
        callback(new Error('申报人证件号码不能超过500字符!'));
    }else{
        callback();
    }
};
//联系人证件号码
const checkContactCode = (rule, value, callback)=> {
    if (value.length > 50) {
        callback(new Error('联系人证件号码不能超过50字符!'));
    }else{
        callback();
    }
};
//申报人户口地址
const checkAddress = (rule, value, callback)=> {
    if (value.length > 1000) {
        callback(new Error('申报人户口地址不能超过1000字符!'));
    }else{
        callback();
    }
};

//分页查询过滤事项名称中的非法字符
export function  fitletaskName(value,_this){
  console.log('fitletaskName:'+value)
  let rules = /[\u4e00-\u9fa5]/;
  if (value != undefined && !rules.test(value) ) {
    _this.$message.warning("事项名称包含非法字符，请重新输入");
    return false;
  }else{
    return true;
  }
}
//分页查询过滤办件编号中的非法字符
export function  fitleProjectNo(value,_this){
  console.log('fitleProjectNo:'+value)
  let rules = /^[A-Za-z0-9]+$/;
  if (value != undefined && !rules.test(value) ) {
    _this.$message.warning("办件编号包含非法字符，请重新输入");
    return false;
  }else{
    return true;
  }
}//分页查询过滤事项编码/业务编码中的非法字符
export function  fitleTaskCodeOrTaskHandleItem(value,_this){
  console.log('fitleTaskCodeOrTaskHandleItem:'+value)
  let rules = /^[A-Za-z0-9]+$/;
  if (value != undefined && !rules.test(value) ) {
    _this.$message.warning("事项/业务项编码包含非法字符，请重新输入");
    return false;
  }else{
    return true;
  }
}
//分页查询过滤申报人姓名中的非法字符
export function  fitleApplyerName(value,_this){
  console.log('fitleApplyerName:'+value)
  let rules = /^[\u4e00-\u9fa5]{0,}$/;
  if (value != undefined && !rules.test(value) ) {
    _this.$message.warning("申报人包含非法字符，请重新输入");
    return false;
  }else{
    return true;
  }
}
export const optionCaseRegister = {
    labelWidth: 200,
    menuBtn: false,
    column: [
        {
            label: "事项编码",
            prop: "taskCode",
            display: false,
        },
        {
            label: "事项名称",
            prop: "taskName",
            display: false,
        },
        {
            label: "事项版本",
            prop: "taskVersion",
            display: false,
        },
        {
            label: "办理形式",
            prop: "applyType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=handle_format",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            display: false,
        },
        {
            label: "办件区划",
            prop: "areaCode",
            display: false,
        },
        {
            label: "区划名称",
            prop: "areaName",
            display: false,
        },
        {
            label: "流程模板ID",
            prop: "processDefinitionId",
            display: false,
        },
        {
            label: "是否最多跑一次",
            prop: "runOnce",
            display: false,
        },
        {
            label: "申报人类型",
            prop: "applyerType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=ApplyerType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择申报人类型",
                trigger: "blur"
            }],
            /*span: 24,
            formslot:true,*/
        },
        {
            label: "申报人证件类型",
            prop: "applyerPageType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择申报人证件类型",
                trigger: "blur"
            }],
            disabled: false,
        },
        {
            label: "申报人证件号码",
            prop: "applyerPageCode",
            rules: [{
                required: true,
                message: "请输入申报人证件号码",
                trigger: "blur"
            }, {
                validator: checkApplyerPageCode,
                trigger: 'blur'
            }],
        },
        {
            label: "申报人",
            prop: "applyerName",
            search: true,
            rules: [{
                required: true,
                message: "请输入申报人",
                trigger: "blur"
            }, {
                validator:checkApplyerName,
                trigger: 'blur'
            }]
        },
        {
            label: "申报人性别",
            prop: "applyerSex",
            rules: [{
                required: false,
                message: "请输入申报人性别（男/女）",
                trigger: "blur"
            }, {
                validator: checkApplyerSex,
                trigger: 'blur'
            }]
        },
        {
            label: "申报人民族",
            prop: "applyerNation",
            rules: [{
                required: false,
                message: "请输入申报人民族",
                trigger: "blur"
            }, {
                validator: checkApplyerNation,
                trigger: 'blur'
            }]
        },
        {
            label: "申请人联系电话",
            prop: "applyerMobile",
            rules: [{
                required: true,
                message: "请输入申请人联系电话",
                trigger: "blur"
            },{
                validator:checkPhone,
                trigger: 'blur'
            }]
        },
        {
            label: "申请时间",
            prop: "applyDate",
            type: "datetime",
            rules: [{
                required: true,
                message: "请输入申请时间",
                trigger: "blur"
            }],
            display: false
        },
        {
            label: "法定代表人",
            prop: "legal",
            rules:[{
                required: true,
                message: "请输入法定代表人",
                trigger: "blur"
            }, {
                validator: checkLegal,
                trigger: 'blur'
            }]
        },
        {
            label: "联系人姓名",
            prop: "contactName",
            rules: [{
                required: true,
                message: "请输入联系人姓名",
                trigger: "blur"
            }, {
                validator: checkContactName,
                trigger: 'blur'
            }]
        },
        {
            label: "联系人证件类型",
            prop: "contactType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择联系人证件类型",
                trigger: "blur"
            }],
        },
        {
            label: "联系人证件号码",
            prop: "contactCode",
            rules: [{
                required: true,
                message: "请输入联系人证件号码",
                trigger: "blur"
            },{
                validator: checkContactCode,
                trigger: 'blur'
            }]
        },
        {
            label: "联系人联系电话",
            prop: "contactMobile",
            rules: [{
                required: true,
                message: "请输入联系人联系电话",
                trigger: "blur"
            },{
                validator:checkPhone,
                trigger: 'blur'
            }]
        },{
            label: "办件来源",
            prop: "caseFrom",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择办件来源",
                trigger: "blur"
            }],
            disabled: true,
            display: false,
            value: "1",
        },
        {
            label: "办件来源",
            prop: "caseFrom",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择办件来源",
                trigger: "blur"
            }],
            disabled: true,
            display: false,
            value: "1",
        },
        {
            label: "办件数量",
            prop: "caseNumber",
            type:'number',
            value:1,
            display: true,
            minRows: 1,
        },{
            label: "申报人户口地址",
            prop: "address",
            span: 24,
            maxlength: 1000,
            type: 'textarea',
            minRows: '2',
            showWordLimit: true,
            rules: [
                {
                    validator: checkAddress,
                    trigger: 'blur'
                }
            ]
        }, {
            label: "是否收费",
            prop: "caseIsFee",
            type:'radio',
            //border:true,
            disabled: true,
            dicData: [
                {
                    label: '是',
                    value: '1'
                },{
                    label: '否',
                    value: '0'
                }]
        },{
            label: "结果是否快递",
            prop: "resultIsEms",
            type:'radio',
            //border:true,
            disabled: true,
            dicData: [
                {
                    label: '是',
                    value: '1'
                },{
                    label: '否',
                    value: '0'
                }],
            value: '0',
        },{
            label: "法定期限",
            prop: "caseLegalDay",
            type:'number',
            display: false
        },
        {
            label: "承诺时限",
            prop: "casePromiseDay",
            type:'number',
            display: false
        },{
            label: "承诺日期",
            prop: "promiseDate",
            type:'number',
            display: false
        },{
            label: "送达方式",
            prop: "receiveWay",
            type:'radio',
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=receiveWay",
            props: {
              label: "dictValue",
              value: "dictKey"
            },
            value: '1',
            rules: [{
                required: true,
                message: "请选择方式",
                trigger: "blur"
            }],
            formslot: true,
        },{
            label: "受理部门统一社会信用代码",
            prop: "orgCode",
            hide:true,
            display: false
        },{
            label: "收件人",
            prop: "receiveName",
            display:false
        },{
            label: "办件状态",
            prop: "caseStatus",
            type:'select',
            disabled:true,
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseStatus',
            value: "1",
            display: false
        },
        {
            label: "办件模块",
            prop: "caseModel",
            type: "select",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseModel',
            value: "2",
            display: false
        }]
};

export const optionCasePreAduit = {
    labelWidth: 150,
    addBtn: false,
    editBtn: false,
    border: true,
    index: true,
    indexLabel: "序号",
    searchMenuSpan: 6,
    searchLabelWidth:120,
    searchMenuPosition: 'left',
    delBtn: false,
    submitBtn: false,
    emptyBtn: false,
    searchBtn: true,
    menuWidth: 150,
    align: "center",
    refreshBtn: false,
    columnBtn: false,
    searchShowBtn: false,
    column: [
        {
            label: "事项编码",
            prop: "taskCode",
            display: false,
            hide: true
        },
        {
            label: "事项名称",
            prop: "taskName",
            display: false,
            width: '280px',
            align: 'left',
            search: true,
        },{
            label: "办件编号",
            prop: "projectNo",
            search: true,
            width: '370px',
            align: 'left',
        },
        {
            label: "事项版本",
            prop: "taskVersion",
            display: false,
            hide: true
        },
        {
            label: "办理形式",
            prop: "applyType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=handle_format",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            display: false,
            hide: true
        },
        {
            label: "办件区划",
            prop: "areaCode",
            display: false,
            hide: true
        },
        {
            label: "区划名称",
            prop: "areaName",
            display: false,
            hide: true
        },
        {
            label: "流程模板ID",
            prop: "processDefinitionId",
            display: false,
            hide: true
        },
        {
            label: "是否最多跑一次",
            prop: "runOnce",
            display: false,
            hide: true
        },
        {
            label: "申报人类型",
            prop: "applyerType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=ApplyerType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择申报人类型",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "申报人证件类型",
            prop: "applyerPageType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择申报人证件类型",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "申报人证件号码",
            prop: "applyerPageCode",
            rules: [{
                required: true,
                message: "请输入申报人证件号码",
                trigger: "blur"
            }],
            width: '180px',
        },
        {
            label: "申报人",
            prop: "applyerName",
            search: true,
            rules: [{
                required: true,
                message: "请输入申报人",
                trigger: "blur"
            }],
        },
        {
            label: "申报人性别",
            prop: "applyerSex",
            rules: [{
                required: false,
                message: "请输入申报人性别",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "申报人民族",
            prop: "applyerNation",
            rules: [{
                required: false,
                message: "请输入申报人民族",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "申请人联系电话",
            prop: "applyerMobile",
            rules: [{
                required: true,
                message: "请输入申请人联系电话",
                trigger: "blur"
            },{
                validator:checkPhone,
                trigger: 'blur'
            }],
            hide: true
        },
        {
            label: "办件来源",
            prop: "caseFrom",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择办件来源",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "办件来源",
            prop: "caseFrom",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择办件来源",
                trigger: "blur"
            }],
            width: '100px',
        },
        {
            label: "申请时间",
            prop: "applyDate",
            type: "datetime",
            rules: [{
                required: true,
                message: "请输入申请时间",
                trigger: "blur"
            }],
            width: '180px',
            display: false
        },
        {
            label: "法定代表人",
            prop: "legal",
            rules:[{
                required: true,
                message: "请输入法定代表人",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "联系人姓名",
            prop: "contactName",
            rules: [{
                required: true,
                message: "请输入联系人姓名",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "联系人证件类型",
            prop: "contactType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择申报人证件类型",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "联系人证件号码",
            prop: "contactCode",
            rules: [{
                required: true,
                message: "请输入联系人证件号码",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "联系人联系电话",
            prop: "contactMobile",
            rules: [{
                required: true,
                message: "请输入联系人联系电话",
                trigger: "blur"
            },{
                validator:checkPhone,
                trigger: 'blur'
            }],
            hide: true
        },
        {
            label: "办件数量",
            prop: "caseNumber",
            type:'number',
            value:1,
            display: true,
            hide: true
        },{
            label: "办理地址",
            prop: "address",
            span: 24,
            type: 'textarea',
            placeholder:'',
            hide: true
        }, {
            label: "是否收费",
            prop: "caseIsFee",
            type:'radio',
          //  border:true,
            disabled: true,
            dicData: [
                {
                    label: '是',
                    value: '1'
                },{
                    label: '否',
                    value: '0'
                }],
            hide: true
        },{
            label: "结果是否快递",
            prop: "resultIsEms",
            type:'radio',
          //  border:true,
            disabled: true,
            dicData: [
                {
                    label: '是',
                    value: '1'
                },{
                    label: '否',
                    value: '0'
                }],
            value: '0',
            hide: true
        },{
            label: "法定期限",
            prop: "caseLegalDay",
            type:'number',
            display: false,
            hide: true
        },
        {
            label: "承诺时限",
            prop: "casePromiseDay",
            type:'number',
            display: false,
            hide: true
        },{
            label: "承诺日期",
            prop: "promiseDate",
            type:'number',
            display: false,
            hide: true
        },{
            label: "送达方式",
            prop: "receiveWay",
            type:'radio',
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=receiveWay",
            props: {
              label: "dictValue",
              value: "dictKey"
            },
            value: '1',
            // dicData: [
            //     {
            //         label: '窗口',
            //         value: '1'
            //     },{
            //         label: '物流',
            //         value: '2'
            //     },{
            //         label: '取件柜',
            //         value: '0'
            //     }],
            rules: [{
                required: true,
                message: "请选择方式",
                trigger: "blur"
            }],
            formslot: true,
            hide: true
        },{
            label: "受理部门统一社会信用代码",
            prop: "orgCode",
            hide:true,
            display: false
        },{
            label: "收件人",
            prop: "receiveName",
            display:false,
            hide: true
        },{
            label: "办件状态",
            prop: "caseStatus",
            type:'select',
            disabled:true,
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseStatus',
            value: "1",
            display: false
        },
        {
            label: "办件模块",
            prop: "caseModel",
            type: "select",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseModel',
            value: "2",
            display: false,
            hide: true
        }]
};

export const optionCaseTable = {
    labelWidth: 150,
    addBtn: false,
    editBtn: false,
    border: true,
    index: true,
    indexLabel: "序号",
    searchMenuSpan: 6,
    searchLabelWidth:120,
    searchMenuPosition:'left',
    delBtn: false,
    align: 'center',
    menuWidth: 150,
    refreshBtn: false,
    columnBtn: false,
    searchShowBtn: false,
    column: [
        {
            label: "事项编码",
            prop: "taskCode",
            display: false,
            hide: true
        },
        {
            label: "事项名称",
            prop: "taskName",
            display: false,
            width: '280px',
            align: 'left',
            search: true,
        },{
            label: "办件编号",
            prop: "projectNo",
            search: true,
            width: '370px',
            align: 'left'
        },
        {
            label: "事项版本",
            prop: "taskVersion",
            display: false,
            hide: true
        },
        {
            label: "办理形式",
            prop: "applyType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=handle_format",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            display: false,
            hide: true
        },
        {
            label: "办件区划",
            prop: "areaCode",
            display: false,
            hide: true
        },
        {
            label: "区划名称",
            prop: "areaName",
            display: false,
            hide: true
        },
        {
            label: "流程模板ID",
            prop: "processDefinitionId",
            display: false,
            hide: true
        },
        {
            label: "是否最多跑一次",
            prop: "runOnce",
            display: false,
            hide: true
        },
        {
            label: "申报人类型",
            prop: "applyerType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=ApplyerType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择申报人类型",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "申报人证件类型",
            prop: "applyerPageType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择申报人证件类型",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "申报人证件号码",
            prop: "applyerPageCode",
            rules: [{
                required: true,
                message: "请输入申报人证件号码",
                trigger: "blur"
            }],
            width: '180px',
        },
        {
            label: "申报人",
            prop: "applyerName",
            search: true,
            rules: [{
                required: true,
                message: "请输入申报人",
                trigger: "blur"
            }]
        },
        {
            label: "申报人性别",
            prop: "applyerSex",
            rules: [{
                required: false,
                message: "请输入申报人性别",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "申报人民族",
            prop: "applyerNation",
            rules: [{
                required: false,
                message: "请输入申报人民族",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "申请人联系电话",
            prop: "applyerMobile",
            rules: [{
                required: true,
                message: "请输入申请人联系电话",
                trigger: "blur"
            },{
                validator:checkPhone,
                trigger: 'blur'
            }],
            hide: true
        },
        {
            label: "办件来源",
            prop: "caseFrom",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择办件来源",
                trigger: "blur"
            }],
            hide: true,

        },
        {
            label: "办件来源",
            prop: "caseFrom",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择办件来源",
                trigger: "blur"
            }],
             width: '100px',
        },
        {
            label: "申请时间",
            prop: "applyDate",
            type: "datetime",
            rules: [{
                required: true,
                message: "请输入申请时间",
                trigger: "blur"
            }],
            display: false
        },
        {
            label: "法定代表人",
            prop: "legal",
            rules:[{
                required: true,
                message: "请输入法定代表人",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "联系人姓名",
            prop: "contactName",
            rules: [{
                required: true,
                message: "请输入联系人姓名",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "联系人证件类型",
            prop: "contactType",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            rules: [{
                required: true,
                message: "请选择申报人证件类型",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "联系人证件号码",
            prop: "contactCode",
            rules: [{
                required: true,
                message: "请输入联系人证件号码",
                trigger: "blur"
            }],
            hide: true
        },
        {
            label: "联系人联系电话",
            prop: "contactMobile",
            rules: [{
                required: true,
                message: "请输入联系人联系电话",
                trigger: "blur"
            },{
                validator:checkPhone,
                trigger: 'blur'
            }],
            hide: true
        },
        {
            label: "办件数量",
            prop: "caseNumber",
            type:'number',
            value:1,
            display: true,
            hide: true
        },{
            label: "办理地址",
            prop: "address",
            span: 24,
            type: 'textarea',
            placeholder:'',
            hide: true
        }, {
            label: "是否收费",
            prop: "caseIsFee",
            type:'radio',
         //   border:true,
            disabled: true,
            dicData: [
                {
                    label: '是',
                    value: '1'
                },{
                    label: '否',
                    value: '0'
                }],
            hide: true
        },{
            label: "结果是否快递",
            prop: "resultIsEms",
            type:'radio',
         //   border:true,
            disabled: true,
            dicData: [
                {
                    label: '是',
                    value: '1'
                },{
                    label: '否',
                    value: '0'
                }],
            value: '0',
            hide: true
        },{
            label: "法定期限",
            prop: "caseLegalDay",
            type:'number',
            display: false,
            hide: true
        },
        {
            label: "承诺时限",
            prop: "casePromiseDay",
            type:'number',
            display: false,
            hide: true
        },{
            label: "承诺日期",
            prop: "promiseDate",
            type:'number',
            display: false,
            hide: true
        },{
            label: "送达方式",
            prop: "receiveWay",
            type:'radio',
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=receiveWay",
            props: {
              label: "dictValue",
              value: "dictKey"
            },
            value: '1',
            // dicData: [
            //     {
            //         label: '窗口',
            //         value: '1'
            //     },{
            //         label: '物流',
            //         value: '2'
            //     },{
            //         label: '取件柜',
            //         value: '0'
            //     }],
            rules: [{
                required: true,
                message: "请选择方式",
                trigger: "blur"
            }],
            formslot: true,
            hide: true
        },{
            label: "受理部门统一社会信用代码",
            prop: "orgCode",
            hide:true,
            display: false
        },{
            label: "收件人",
            prop: "receiveName",
            display:false,
            hide: true
        },{
            label: "办件状态",
            prop: "caseStatus",
            type:'select',
            disabled:true,
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseStatus',
            value: "1",
            display: false,
            width: '100px',
        },
        {
            label: "办件模块",
            prop: "caseModel",
            type: "select",
            props: {
                label: "dictValue",
                value: "dictKey"
            },
            dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseModel',
            value: "2",
            display: false,
            hide: true
        }
    ]
};

export const optionQuery = {
  tip: false,
  searchShow: true,
  align:'center',
  searchLabelWidth:140,
  searchMenuSpan: 8,
  searchMenuPosition:'right',
  menuWidth: 150,
  border: true,
  index: true,
  indexLabel: "序号",
  viewBtn: false,
  selection: false,
  dialogClickModal: false,
  refreshBtn: false,
  columnBtn: false,
  searchShowBtn: false,
  column: [
    {
      label: "事项编码",
      prop: "taskCode",
      display: false,
      hide: true,

    },
    {
      label: "事项名称",
      prop: "taskName",
      display: false,
      align: 'left',
      search: true,
      overHidden: true,
      searchSpan:8
    },
    {
      label: "办件编号",
      prop: "projectNo",
      search: true,
      overHidden: true,
      align: 'left',
      searchSpan:8
    },
    {
      label: "事项版本",
      prop: "taskVersion",
      display: false,
      hide: true,
    },
    {
      label: "办理形式",
      prop: "applyType",
      type: "select",
      dicUrl: "/api/blade-system/dict-biz/dictionary?code=handle_format",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      display: false,
      hide: true,
    },
    {
      label: "办件区划",
      prop: "areaCode",
      display: false,
      hide: true,
    },
    {
      label: "区划名称",
      prop: "areaName",
      display: false,
      hide: true,
    },
    {
      label: "流程模板ID",
      prop: "processDefinitionId",
      display: false,
      hide: true,
    },
    {
      label: "是否最多跑一次",
      prop: "runOnce",
      display: false,
      hide: true,
    },
    {
      label: "申请人类型",
      prop: "applyerType",
      type: "select",
      dicUrl: "/api/blade-system/dict-biz/dictionary?code=ApplyerType",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      rules: [{
        required: true,
        message: "请选择申请人类型",
        trigger: "blur"
      }],
      hide: true,
    },
    {
      label: "申请人证件类型",
      prop: "applyerPageType",
      type: "select",
      dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      rules: [{
        required: true,
        message: "请选择申请人证件类型",
        trigger: "blur"
      }],
      hide: true,
    },
    {
      label: "申请人",
      prop: "applyerName",
      span: 24,
      search: true,
      formslot:true,
      searchSpan:8,
      rules: [{
        required: true,
        message: "请输入申请人",
        trigger: "blur"
      }]
    },
    {
      label: "申请人证件号码",
      prop: "applyerPageCode",
      search: true,
      searchSpan: 8,
      rules: [{
        required: true,
        message: "请输入申请人证件号码",
        trigger: "blur"
      }],
      width: '180px',
    },
    {
      label: "申请人性别",
      prop: "applyerSex",
      type: "radio",
      dicData: [
        {
          label: "男",
          value: "男"
        },
        {
          label: "女",
          value: "女"
        },
      ],
      rules: [{
        required: false,
        message: "请输入申请人性别",
        trigger: "blur"
      }],
      hide: true
    },
    {
      label: "申请人民族",
      prop: "applyerNation",
      type: "select",
      dicData: nationalDicData,
      filterable: true,
      rules: [{
        required: false,
        message: "请输入申请人民族",
        trigger: "blur"
      }],
      hide: true
    },
    {
      label: "申请人联系电话",
      prop: "applyerMobile",
      rules: [{
        required: true,
        message: "请输入申请人联系电话",
        trigger: "blur"
      },{
        validator:checkPhone,
        trigger: 'blur'
      }],
      hide: true,
    },
    {
      label: "申请时间",
      prop: "applyDate",
      type: "datetime",
      rules: [{
        required: true,
        message: "请输入申请时间",
        trigger: "blur"
      }],
      display: false,
      width: '180px',
    },
    {
      label: "法定代表人",
      prop: "legal",
      rules:[{
        required: true,
        message: "请输入法定代表人",
        trigger: "blur"
      }],
      hide: true,
    },
    {
      label: "联系人姓名",
      prop: "contactName",
      searchSpan: 8,
      search: true,
      rules: [{
        required: true,
        message: "请输入联系人姓名",
        trigger: "blur"
      }],
      hide: true,
    },
    {
      label: "联系人证件类型",
      prop: "contactType",
      type: "select",
      dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      rules: [{
        required: true,
        message: "请选择申请人证件类型",
        trigger: "blur"
      }],
      hide: true,
    },
    {
      label: "联系人证件号码",
      prop: "contactCode",
      searchSpan: 8,
      search: true,
      rules: [{
        required: true,
        message: "请输入联系人证件号码",
        trigger: "blur"
      }],
      hide: true,
    },
    {
      label: "联系人联系电话",
      prop: "contactMobile",
      rules: [{
        required: true,
        message: "请输入联系人联系电话",
        trigger: "blur"
      },{
        validator:checkPhone,
        trigger: 'blur'
      }],
      hide: true,
    },{
      label: "办件来源",
      prop: "caseFrom",
      type: "select",
      dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      rules: [{
        required: true,
        message: "请选择办件来源",
        trigger: "blur"
      }],
      disabled: true,
      display: false,
      searchSpan:8,
      value: "1",
      width: '100px',
      search: true,
    },
    {
      label: "办件数量",
      prop: "caseNumber",
      type:'number',
      value:1,
      display: false,
      hide: true,
    },{
      label: "是否收费",
      prop: "caseIsFee",
      type:'radio',
      //border:true,
      disabled: true,
      dicData: [
        {
          label: '是',
          value: '1'
        },{
          label: '否',
          value: '0'
        }],
      hide: true,
    },{
      label: "办理地址",
      prop: "address",
      span: 24,
      type: 'textarea',
      hide: true,
    }, {
      label: "结果是否快递",
      prop: "resultIsEms",
      type:'radio',
      //border:true,
      disabled: true,
      dicData: [
        {
          label: '是',
          value: '1'
        },{
          label: '否',
          value: '0'
        }],
      value: '0',
      hide: true,
      display: false,
    },{
      label: "法定期限",
      prop: "caseLegalDay",
      type:'number',
      display: false,
      hide: true,
    },
    {
      label: "承诺时限",
      prop: "casePromiseDay",
      type:'number',
      display: false,
      hide: true,
    },{
      label: "承诺日期",
      prop: "promiseDate",
      type:'number',
      display: false,
      hide: true,
    },{
      label: "结果送达方式",
      prop: "receiveWay",
      type:'radio',
      dicUrl: "/api/blade-system/dict-biz/dictionary?code=receiveWay",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      value: '1',
      // dicData: [
      //     {
      //         label: '窗口',
      //         value: '1'
      //     },{
      //         label: '物流',
      //         value: '2'
      //     },{
      //         label: '取件柜',
      //         value: '0'
      //     }],
      rules: [{
        required: true,
        message: "请选择方式",
        trigger: "blur"
      }],
      formslot: true,
      hide: true,
    },{
      label: "受理部门统一社会信用代码",
      prop: "orgCode",
      hide:true,
      display: false,
    },{
      label: "收件人",
      prop: "receiveName",
      display:false,
      hide: true,
    },{
      label: "办件状态",
      prop: "caseStatus",
      type:'select',
      disabled:true,
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseStatus',
      value: "1",
      display: false,
      width: '100px'
    },
    {
      label: "办件模块",
      prop: "caseModel",
      type: "select",
      props: {
        label: "dictValue",
        value: "dictKey"
      },
      dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseModel',
      value: "2",
      display: false,
      hide: true,
    },
    {
      label: "分发状态",
      prop: "isDistribute",
      type: "select",
      width: '100px',
      dicData: [
        {
          label: "已分发",
          value: "1"
        },
        {
          label: "未分发",
          value: "0"
        },
        {
          label: "未分发",
          value: ""
        },
        {
          label: "分发失败",
          value: "2"
        },
      ],
      display: false,
      align: "center"
    },{
      label: '申请时间',
      prop: 'searchDate',
      type:'datetime',
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
      searchSpan:8,
      searchRange:true,
      search:true,
      hide: true,
      display: false
    },
  ]
};

export const optionCaseDetail = {
    labelWidth: 150,
    menuBtn: false,
    disabled: true,
    group: [
        {
            label: '基本信息',
            prop: 'baseInfo',
            column: [
                {
                    label: "事项编码",
                    prop: "taskCode",
                    display: false,
                    readonly: true,
                },
                {
                    label: "办件编号",
                    prop: "projectNo",
                    readonly: true,
                },
                {
                    label: "事项名称",
                    prop: "taskName",
                    display: false,
                    readonly: true,
                },
                {
                    label: "事项版本",
                    prop: "taskVersion",
                    display: false,
                    readonly: true,
                },
                {
                    label: "办理形式",
                    prop: "applyType",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=handle_format",
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    display: false,
                    readonly: true,
                },
                {
                    label: "办件区划",
                    prop: "areaCode",
                    display: false,
                    readonly: true,
                },
                {
                    label: "区划名称",
                    prop: "areaName",
                    display: false,
                    readonly: true,
                },
                {
                    label: "流程模板ID",
                    prop: "processDefinitionId",
                    display: false,
                    readonly: true,
                },
                {
                    label: "是否最多跑一次",
                    prop: "runOnce",
                    display: false,
                    readonly: true,
                },
                {
                    label: "申报人类型",
                    prop: "applyerType",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=ApplyerType",
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    rules: [{
                        required: true,
                        message: "请选择申报人类型",
                        trigger: "blur"
                    }],
                    readonly: true,
                },
                {
                    label: "申报人证件类型",
                    prop: "applyerPageType",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    rules: [{
                        required: true,
                        message: "请选择申报人证件类型",
                        trigger: "blur"
                    }],
                    readonly: true,
                },
                {
                    label: "申报人证件号码",
                    prop: "applyerPageCode",
                    rules: [{
                        required: true,
                        message: "请输入申报人证件号码",
                        trigger: "blur"
                    }],
                    readonly: true,
                },
                {
                    label: "申报人",
                    prop: "applyerName",
                    rules: [{
                        required: true,
                        message: "请输入申报人",
                        trigger: "blur"
                    }],
                    readonly: true,
                },
                {
                    label: "申报人性别",
                    prop: "applyerSex",
                    rules: [{
                        required: false,
                        message: "请输入申报人性别",
                        trigger: "blur"
                    }],
                    readonly: true
                },
                {
                    label: "申报人民族",
                    prop: "applyerNation",
                    rules: [{
                        required: false,
                        message: "请输入申报人民族",
                        trigger: "blur"
                    }],
                    readonly: true
                },
                {
                    label: "申请人联系电话",
                    prop: "applyerMobile",
                    rules: [{
                        required: true,
                        message: "请输入申请人联系电话",
                        trigger: "blur"
                    },{
                        validator:checkPhone,
                        trigger: 'blur'
                    }],
                    readonly: true,
                },
                {
                    label: "申请时间",
                    prop: "applyDate",
                    type: "datetime",
                    rules: [{
                        required: true,
                        message: "请输入申请时间",
                        trigger: "blur"
                    }],
                    display: false,
                    readonly: true,
                },
                {
                    label: "法定代表人",
                    prop: "legal",
                    rules:[{
                        required: true,
                        message: "请输入法定代表人",
                        trigger: "blur"
                    }],
                    readonly: true,
                },
                {
                    label: "联系人姓名",
                    prop: "contactName",
                    rules: [{
                        required: true,
                        message: "请输入联系人姓名",
                        trigger: "blur"
                    }],
                    readonly: true,
                },
                {
                    label: "联系人证件类型",
                    prop: "contactType",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=PageType",
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    rules: [{
                        required: true,
                        message: "请选择申报人证件类型",
                        trigger: "blur"
                    }],
                    readonly: true,
                },
                {
                    label: "联系人证件号码",
                    prop: "contactCode",
                    rules: [{
                        required: true,
                        message: "请输入联系人证件号码",
                        trigger: "blur"
                    }],
                    readonly: true,
                },
                {
                    label: "联系人联系电话",
                    prop: "contactMobile",
                    rules: [{
                        required: true,
                        message: "请输入联系人联系电话",
                        trigger: "blur"
                    },{
                        validator:checkPhone,
                        trigger: 'blur'
                    }],
                    readonly: true,
                },{
                    label: "办件来源",
                    prop: "caseFrom",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    rules: [{
                        required: true,
                        message: "请选择办件来源",
                        trigger: "blur"
                    }],
                    disabled: true,
                    display: false,
                    value: "1",
                    readonly: true,
                },
                {
                    label: "办件来源",
                    prop: "caseFrom",
                    type: "select",
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=case_from",
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    rules: [{
                        required: true,
                        message: "请选择办件来源",
                        trigger: "blur"
                    }],
                    disabled: true,
                    display: false,
                    value: "1",
                    readonly: true,
                },
                {
                    label: "办件数量",
                    prop: "caseNumber",
                    type:'number',
                    value:1,
                    display: true,
                    readonly: true,
                },{
                    label: "办理地址",
                    prop: "address",
                    span: 24,
                    type: 'textarea',
                    placeholder:'',
                    readonly: true,
                }, {
                    label: "是否收费",
                    prop: "caseIsFee",
                    type:'radio',
                    //border:true,
                    disabled: true,
                    dicData: [
                        {
                            label: '是',
                            value: '1'
                        },{
                            label: '否',
                            value: '0'
                        }],
                    readonly: true,
                },{
                    label: "结果是否快递",
                    prop: "resultIsEms",
                    type:'radio',
                    //border:true,
                    disabled: true,
                    dicData: [
                        {
                            label: '是',
                            value: '1'
                        },{
                            label: '否',
                            value: '0'
                        }],
                    value: '0',
                    readonly: true,
                },{
                    label: "法定期限",
                    prop: "caseLegalDay",
                    type:'number',
                    display: false,
                    readonly: true,
                },
                {
                    label: "承诺时限",
                    prop: "casePromiseDay",
                    type:'number',
                    display: false,
                    readonly: true,
                },{
                    label: "承诺办结日期",
                    prop: "promiseDate",
                    type:'date',
                    display: false,
                    readonly: true,
                },{
                    label: "送达方式",
                    prop: "receiveWay",
                    type:'radio',
                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=receiveWay",
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    value: '1',
                    // dicData: [
                    //     {
                    //         label: '窗口',
                    //         value: '1'
                    //     },{
                    //         label: '物流',
                    //         value: '2'
                    //     },{
                    //         label: '取件柜',
                    //         value: '0'
                    //     }],
                    rules: [{
                        required: true,
                        message: "请选择方式",
                        trigger: "blur"
                    }],
                    formslot: true,
                    readonly: true,
                },{
                    label: "受理部门统一社会信用代码",
                    prop: "orgCode",
                    hide:true,
                    display: false,
                    readonly: true,
                },{
                    label: "收件人",
                    prop: "receiveName",
                    display:false,
                    readonly: true,
                },{
                    label: "办件状态",
                    prop: "caseStatus",
                    type:'select',
                    disabled:true,
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseStatus',
                    value: "1",
                    display: false,
                    readonly: true,
                },
                {
                    label: "办件模块",
                    prop: "caseModel",
                    type: "select",
                    props: {
                        label: "dictValue",
                        value: "dictKey"
                    },
                    dicUrl:'/api/blade-system/dict-biz/dictionary?code=caseModel',
                    value: "2",
                    display: false,
                    readonly: true,
                }]
        },
        {
            label: '情形引导',
            prop: 'condition',
            column: [
                {
                    label: '',
                    prop: 'conditions',
                    span: 24,
                    formslot: true,
                }
            ]
        }
    ],
};
